Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

don't copy time.Timer and Ticker by value#23

Open
mdelah wants to merge 1 commit intomicrosoft:masterfrom
mdelah:timer-ticker-no-copy
Open

don't copy time.Timer and Ticker by value#23
mdelah wants to merge 1 commit intomicrosoft:masterfrom
mdelah:timer-ticker-no-copy

Conversation

@mdelah
Copy link

@mdelah mdelah commented Oct 20, 2021

As this SO thread illustrates, time.Timer/Ticker must not be copied by value, because (among other things) .Stop() doesn't work correctly. This changes DefaultClock not to do that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant